﻿<%@ Page Title="" Language="C#" MasterPageFile="~/user.Master" AutoEventWireup="true" CodeBehind="Passenger_sale_ticket.aspx.cs" Inherits="Bus_proj.website.Passenger_sale_ticket" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="../Styles/Stylebuttoncss.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/textbox.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style4
        {
            width: 101px;
        }
        .style6
        {
            height: 55px;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
    </Triggers>
<fieldset class="el03">
<legend>จองตั๋วรถโดยสาร</legend>
<fieldset class="el02"> 
    <table class="style1">
        <tr>
            <td class="style22" align="right">
                &nbsp;</td>
            
            <td class="style24">            
            </td>
            <td align="right" class="style20">
                &nbsp;</td>
            <td class="style6">
                
                <fieldset class="el03">
                    <asp:Panel ID="Panel1" runat="server">
                        <table class="style1">
                            <tr>
                                <td class="style4">
                                    <asp:Label ID="Label1" runat="server" Text="วันที่"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox1" runat="server" ReadOnly="True" CssClass="textbox"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style4">
                                    <asp:Label ID="Label2" runat="server" Text="เวลาขณะนี้"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox2" runat="server" ReadOnly="True" CssClass="textbox"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                </fieldset></td>
        </tr>
        <tr>
            <td class="style23" align="right">
                &nbsp;</td>
            <td class="style25">
                &nbsp;</td>
            <td align="right" class="style27">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="right" class="style23">
                <asp:Label ID="Label10" runat="server" Text="ชื่อต้นทาง :"></asp:Label>
            </td>
            <td class="style25">
                <asp:TextBox ID="TextBox5" runat="server" CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" class="style27">
                <asp:Label ID="Label4" runat="server" Text="วันที่เดินทาง :"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TextBox3" runat="server" TextMode="Date" CssClass="textbox"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right" class="style23">
                <asp:Label ID="Label3" runat="server" Text="ชื่อปลายทาง :"></asp:Label>
            </td>
            <td class="style25">
                <asp:TextBox ID="TextBox6" runat="server" CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" class="style27">
                <asp:Label ID="Label5" runat="server" Text="เวลาเดินทาง :"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TextBox4" runat="server" TextMode="Time" CssClass="textbox"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style23" align="right">
                <asp:Label ID="Label11" runat="server" Text="รหัสเส้นทาง :"></asp:Label>
            </td>
            <td class="style25">
                <asp:DropDownList ID="DropDownList5" runat="server" AppendDataBoundItems="True" 
                    DataSourceID="SqlDataSource1" DataTextField="Around_no" 
                    DataValueField="Around_no" Height="21px" Width="102px" CssClass="textbox">
                    <asp:ListItem Selected="True" Value="0">*เลือก</asp:ListItem>
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:Bus_proConnectionString %>" SelectCommand="select distinct Around_no
from Table_Around"></asp:SqlDataSource>
            </td>
            <td align="right" class="style27">
                <asp:Label ID="Label6" runat="server" Text="ประเภทรถ :"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="DropDownList3" runat="server" AppendDataBoundItems="True" 
                    DataSourceID="LinqDataSource3" DataTextField="Type_Bus_name" 
                    DataValueField="Type_Bus_id" Width="150px" CssClass="textbox">
                    <asp:ListItem Selected="True" Value="0">*เลือกประเภทรถ</asp:ListItem>
                </asp:DropDownList>
                <asp:LinqDataSource ID="LinqDataSource3" runat="server" 
                    ContextTypeName="Bus_proj.DataClasses1DataContext" EntityTypeName="" 
                    TableName="Table_Type_Bus">
                </asp:LinqDataSource>
            </td>
        </tr>
        <tr>
            <td class="style23" align="right">
                &nbsp;</td>
            <td class="style25">
                
                    <asp:Panel ID="Panel3" runat="server">
                    </asp:Panel>
               
            <td align="right" class="style27">
                &nbsp;<td>
                    &nbsp;</td>
                    </td>
        </tr>
        <tr>
            <td class="style23" align="right">
                &nbsp;</td>
            <td class="style25">
                <asp:Button ID="Button1" runat="server" Text="ค้นหา" Width="139px" 
                    onclick="Button1_Click" Height="36px" CssClass="classname" />
            </td>
            <td align="right" class="style27">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</fieldset>  

    <asp:Panel ID="Panel2" runat="server" Visible="False">
    <fieldset class="el02">
    <legend>ตารางแสดงรอบรถ</legend>
    <table class="style1">
    <tr>
        <td align="center">
            <asp:GridView ID="GridView1" runat="server" BackColor="White" 
                BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                ForeColor="Black" GridLines="Vertical" onrowcommand="GridView1_RowCommand1">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return confirm('ยืนยันการเลือกรายการ')" CommandName="cmdY" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" >เลือก</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    
                    <span style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;">
                    ไม่มีรอบเดินทาง</span>
                    
                </EmptyDataTemplate>
                <FooterStyle BackColor="#CCCC99" />
                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                <RowStyle BackColor="#F7F7DE" />
                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#FBFBF2" />
                <SortedAscendingHeaderStyle BackColor="#848384" />
                <SortedDescendingCellStyle BackColor="#EAEAD3" />
                <SortedDescendingHeaderStyle BackColor="#575357" />
            </asp:GridView>
        </td>
    </tr>
        <tr>
            <td align="center">
                &nbsp;</td>
        </tr>
    <tr>
        <td align="center">
            &nbsp;</td>
    </tr>
</table>
    </fieldset>
    </asp:Panel>
</fieldset>
    </ContentTemplate>
    </asp:UpdatePanel>

    </asp:Content>
